<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      #chart {
        background-color: gray;
      }
    </style>
  </head>
  <body>
    <canvas id="chart" width="800" height="400"></canvas>
    <script>
      // 获取canvas容器
      const chart = document.getElementById('chart');
      // 获取画笔
      const context = chart.getContext('2d');

      context.beginPath();
      context.arc(400, 200, 50, 0, 2 * Math.PI, false);
      context.stroke();
      context.closePath();

      context.beginPath();
      context.arc(400, 200, 100, 0, 2 * Math.PI, false);
      context.stroke();
      context.closePath();
    </script>
  </body>
</html>
